<div class="layui-side layui-bg-black">
	<div class="layui-side-scroll">
		<#include "/apps/business/xiaoe/include/left.html">
	</div>
</div>
<div class="layui-body">
	<div class="layui-side-scroll">
		<div class="row" style="height:100%;">
			<div class="col-lg-3" style="border-right:1px solid #e6e6e6;padding-right:0px;">
				<h1 class="site-h1" style="background-color:#FFFFFF;">
					词库类型
					<span style="float:right;">
						<button class="layui-btn layui-btn-sm green" href="/apps/xiaoe/words/type/add.html" data-toggle="ajax" data-height="200" data-width="550" data-title="新建分类">
							新建分类
						</button>
					</span>
				</h1>
				<div class="row">
					<div class="col-lg-12">
						<ul>
							<li class="uk_role  <#if !curtype??>this</#if>"">
								<a href="/apps/xiaoe/words.html">
									<i class="kfont">&#xe61d;</i>
									默认
								</a>
							</li>
							<#if wordsTypeList??>
							<#list wordsTypeList as wordsType>
							<li class="uk_role <#if wordsType?? && wordsType.id == curtype.id>this</#if>">
								<a href="/apps/xiaoe/words.html?type=${wordsType.id!''}">
									<i class="kfont">&#xe7d0;</i>
									${wordsType.name!''}
								</a>
							</li>
							</#list>
							</#if>
						</ul>
					</div>
				</div>
			</div>
			<div class="col-lg-9">
				<h1 class="site-h1" style="background-color:#FFFFFF;">
					“<#if curtype??>${curtype.name!''}<#else>默认</#if>”词库下的词条列表<#if wordsList??>（${wordsList?size}）</#if>
				</h1>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12">
						<table class="layui-table" lay-skin="line">
							<thead>
							<tr>
							  	<th style="width:45%">关键词</th>
							  	<th style="width:45%">拆分</th>
							  	<th style="width:10%">对比</th>
							  <!-- <th>创建时间</th> -->
							</tr> 
						  </thead>
						  <tbody>
						  	<#if wordsList?? && wordsList?size gt 0>
							<#list wordsList as words>
							<tr>
							  <td class="ukefu_topic_title">
									${words.keyword!''}
							  </td>
							  <td class="ukefu_topic_title">
									<#if words.tokens??>
									<#list words.tokens as token>
									<#if token_index gt 0>|</#if>${token!''} 
									</#list>
									</#if>
							  </td>
							  <td class="ukefu_topic_title">
									<#if words.same?? && words.same == false><i class="layui-icon" title="拆分结果不相同" style="color:red;font-weight:600;">&#x1006;</i></#if>
							  </td>
							  </tr>
							</#list>
							<#else>
							<tr>
							  	<th style="width:100%;text-align: center;" colspan="3" align="center">对比无异常</th>
							</tr> 
							</#if>
						</table>
					</div> 	   
				</div>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12" id="page" style="text-align:center;"></div>
				</div>
			</div>	
		</div>
	</div>
</div>
<script>
	$(document).ready(function(){
		$('#batdel').click(function(){
			var ids = "";
			var num = 0 ;
			$('.ids').each(function(){
				if($(this).prop("checked")){
					if(ids!= ""){
						ids += ","  ;
					}
					ids += $(this).val();
					num++;
				}
			});
			if(num>0){
				top.layer.confirm("请确认是否删除选中词条？",{icon: 3, title:'提示'}, function(index){
					top.layer.close(index);
					location.href='/apps/xiaoe/words/batdelete.html?type=${curtype.id!''}&word='+ids ;
				});
			}else{
				top.layer.alert("请先选择需要删除的词条");
				$('#batdel').attr("href" , "javascript:void(0)");
			}
		});
		
	});
</script>
